<template>
  <div class="topbar">
    <i class="fa fa-bars" aria-hidden="true" v-if="hasMenu"></i>
    <h3>班委有话说</h3>
  </div>
</template>

<script>
export default {
  name: 'topbar',
  computed: {
    hasMenu () {
      let hash = window.location.hash
      if (hash === '#/register' || hash === '#/login') return false
      else return true
    }
  }
}
</script>

<style>
.topbar {
    width: 100%;
    height: 50px;
    background-color: #84cf30;
    padding-left: 20px;
    text-align: center;
}
.topbar i {
    color: white;
    float: left;
    line-height: 50px;
}
.topbar h3 {
    display: inline-block;
    line-height: 50px;
    margin: 0;
    color: white;
}
</style>
